<template>
	<view>
		<u-modal v-model="showModal" :title="title" :content="content" :confirm="confirm" :cancel="cancel"></u-modal>
	</view>
</template>

<script>
	export default {  
		name:'myModal',
		data() {
			return {
				title:'',
				content:'',
				showModal:false
			}
		},
		onLoad() {
			var that=this;
			// this.$on('show:modal',this.showModal(param));
		},
		methods: {
			show(title,content){
				this.title=title;
				this.content=content;
				this.showModal=true;
			},
			hide(){
				this.showModal=false;
			},
			confirm(){
				uni.$emit('confirm');
			},
			cancel(){
				uni.$emit('cancel');
			}
		}
	}
</script>

<style>

</style>